import 'package:adaptive_dialog/adaptive_dialog.dart';
import 'package:flutter/widgets.dart';

///提示框
class DialogUtils {
  static showDialog(BuildContext context) async {
    // 单个点击框
    // await showOkAlertDialog(
    //   context: context,
    //   title: '提示',
    //   message: '内容',
    //   okLabel: '好的',
    //   useRootNavigator: false,
    //   barrierDismissible: false,
    // );
    // 弹出框+返回值
    var ret = await showAlertDialog<String>(
      context: context,
      title: '提示',
      message: '请连接网络',
      actions: [
        AlertDialogAction<String>(
          label: 'lable1',
          key: '1',
        ),
        AlertDialogAction<String>(label: 'lable2', key: '2'),
      ],
    );
    print('result:$ret');
  }
}
